import numpy as np
Z = np.zeros((8,8),dtype=int)#声明一个0数组，元素是整数，这一步相当于初始化了
Z[1::2,::2] = 1
Z[::2,1::2] = 1
print(Z)